package guda.shop.core.entity.base;

import guda.shop.core.entity.Member;
import guda.shop.core.entity.User;
import guda.shop.core.entity.Website;

import java.io.Serializable;
import java.util.Date;

public abstract class BaseMember
        implements Serializable {
    private static final long serialVersionUID = 1L;
    public static String REF = "Member";
    public static String PROP_WEBSITE = "website";
    public static String PROP_CREATE_TIME = "createTime";
    public static String PROP_DISABLED = "disabled";
    public static String PROP_USER = "user";
    public static String PROP_ID = "id";
    private int uuid = -2147483648;
    private Long id;
    private Date time;
    private Boolean disabled;
    private Boolean active;
    private String activationCode;
    private User user;
    private Website website;

    public BaseMember() {
        initialize();
    }

    public BaseMember(Long paramLong) {
        setId(paramLong);
        initialize();
    }

    public BaseMember(Long paramLong, User paramUser, Website paramWebsite, Date paramDate, Boolean paramBoolean1, Boolean paramBoolean2, String paramString) {
        setId(paramLong);
        setUser(paramUser);
        setWebsite(paramWebsite);
        setCreateTime(paramDate);
        setDisabled(paramBoolean1);
        setActive(paramBoolean2);
        setActivationCode(paramString);
        initialize();
    }

    protected void initialize() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long paramLong) {
        this.id = paramLong;
        this.uuid = -2147483648;
    }

    public Date getCreateTime() {
        return this.time;
    }

    public void setCreateTime(Date paramDate) {
        this.time = paramDate;
    }

    public Boolean getDisabled() {
        return this.disabled;
    }

    public void setDisabled(Boolean paramBoolean) {
        this.disabled = paramBoolean;
    }

    public Boolean getActive() {
        return this.active;
    }

    public void setActive(Boolean paramBoolean) {
        this.active = paramBoolean;
    }

    public String getActivationCode() {
        return this.activationCode;
    }

    public void setActivationCode(String paramString) {
        this.activationCode = paramString;
    }

    public User getUser() {
        return this.user;
    }

    public void setUser(User paramUser) {
        this.user = paramUser;
    }

    public Website getWebsite() {
        return this.website;
    }

    public void setWebsite(Website paramWebsite) {
        this.website = paramWebsite;
    }

    public boolean equals(Object paramObject) {
        if (null == paramObject)
            return false;
        if (!(paramObject instanceof Member))
            return false;
        Member localMember = (Member) paramObject;
        if ((null == getId()) || (null == localMember.getId()))
            return false;
        return getId().equals(localMember.getId());
    }

    public int hashCode() {
        if (-2147483648 == this.uuid) {
            if (null == getId())
                return super.hashCode();
            String str = getClass().getName() + ":" + getId().hashCode();
            this.uuid = str.hashCode();
        }
        return this.uuid;
    }

    public String toString() {
        return super.toString();
    }
}

